<%--
  Created by IntelliJ IDEA.
  User: 22531
  Date: 2021/6/10
  Time: 0:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css">
    <script type="text/javascript" src="/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/js/datagrid-export.js"></script>
    <script src="/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">
        $(function (){
            $('#teaCourse').datagrid({
                url:'/tea/teaGetCourse?id=${sessionScope.tea.id}',
                columns:[[
                    {field:'status',title:'',width:100,align:'center',
                        editor: {
                            type:'checkbox',
                            options:{on:'P',off:''}
                        }
                    },
                    {field:'id',title:'课程ID',width:100,align:'center'},
                    {field:'name',title:'课程名称',width:100,align:'center'},
                    {field:'place',title:'上课地点',width:100,align:'center'},
                    {field:'c_year',title:'年度',width:100,align:'center'},
                    {field:'c_type',title:'课程类型',width:100,align:'center'},
                ]],
                rownumbers:true,
                pagination: true,
                pageSize:10,
                pageList:[10,20,30,40,50],
                singleSelect: true,
                toolbar: [{
                    iconCls: 'icon-reload',
                    text:'刷新',
                    handler: function(){
                        $('#teaCourse').datagrid('reload');
                    }
                },'-',{
                    iconCls: 'icon-excel',
                    text: '导出excel',
                    handler: function () {
                        $('#teaCourse').datagrid('toExcel','dg.xls')
                    },
                }
                ],
            });
        })
    </script>
</head>
<body>
<div class="easyui-panel" data-options="fit:true,border:false">
    <table id="teaCourse" ></table>
</div>
</body>
</html>
